$(function(){
	if(Number($('.after span').html())<0){
		$('.after span').html('0.00');
	}
	//确认支付
	$('.saveUserInfo').click(function(){
		//判断余额是否够
		need = Number($('.need span').html()); 
		user = Number($('.user span').html()); 
		oid = $('.oid').val();
		if(user<need){
			//余额不足
			$('.nogoodschoose').show();
			return false;
		}
		$('.loading').show();
		$.ajax({
			data:'oid='+oid,
			type:'post',
			dataType:'json',
			url:controller+"/payfoOrder",
			success:function(msg){
				if(msg.error != '0'){
					$('.loading').hide();
					$('.success').show();
					location.href =controller+"/mycarStep_4/oid/"+msg.oid;		
				}else{
					$('.nogoodschoose').show();
				}

			}
		})
	})
})